Simulating an if condition in the WHERE clause of an SQL query

join shbcf.ru